import 'package:flutter/cupertino.dart';
import 'package:flutter_svg/svg.dart';

enum IconNames {
  edit,
  history,
  historyCopy,
  newLogo,
  messages,
  back,
  myself,
  next,
  keyboard,
  search,
  down,
  more,
  morePoint,
  myselfPainter,
  eyesClose,
  boy,
  add,
  arrowRight,
  eyesOpen,
  girl,
  boys,
  audio,
  chat,
  setting,
  provider,
  emoji,
  picture,
  room
}

/// A class includes all icons which you provided from https://iconfont.cn
///
/// How to use it:
/// ```dart
/// IconFont(IconNames.xxx);
/// IconFont(IconNames.xxx, color: '#f00');
/// IconFont(IconNames.xxx, colors: ['#f00', 'blue']);
/// IconFont(IconNames.xxx, size: 30, color: '#000');
/// ```
///
/// The name is dynamic to against server interface.
/// Feel free to input string literal.
/// ```dart
/// IconFont('xxx');
/// ```
// ignore: must_be_immutable
class IconFont extends StatelessWidget {
  IconNames? name;
  final String? color;
  final List<String>? colors;
  final double size;

  IconFont(dynamic iconName,
      {Key? key, this.size = 18, this.color, this.colors})
      : super(key: key) {
    switch (iconName) {
      case 'edit':
        iconName = IconNames.edit;
        break;
      case 'history':
        iconName = IconNames.history;
        break;
      case 'historyCopy':
        iconName = IconNames.historyCopy;
        break;
      case 'newLogo':
        iconName = IconNames.newLogo;
        break;
      case 'messages':
        iconName = IconNames.messages;
        break;
      case 'back':
        iconName = IconNames.back;
        break;
      case 'myself':
        iconName = IconNames.myself;
        break;
      case 'next':
        iconName = IconNames.next;
        break;
      case 'keyboard':
        iconName = IconNames.keyboard;
        break;
      case 'search':
        iconName = IconNames.search;
        break;
      case 'down':
        iconName = IconNames.down;
        break;
      case 'more':
        iconName = IconNames.more;
        break;
      case 'morePoint':
        iconName = IconNames.morePoint;
        break;
      case 'myselfPainter':
        iconName = IconNames.myselfPainter;
        break;
      case 'eyesClose':
        iconName = IconNames.eyesClose;
        break;
      case 'boy':
        iconName = IconNames.boy;
        break;
      case 'add':
        iconName = IconNames.add;
        break;
      case 'arrowRight':
        iconName = IconNames.arrowRight;
        break;
      case 'eyesOpen':
        iconName = IconNames.eyesOpen;
        break;
      case 'girl':
        iconName = IconNames.girl;
        break;
      case 'boys':
        iconName = IconNames.boys;
        break;
      case 'audio':
        iconName = IconNames.audio;
        break;
      case 'chat':
        iconName = IconNames.chat;
        break;
      case 'setting':
        iconName = IconNames.setting;
        break;
      case 'provider':
        iconName = IconNames.provider;
        break;
      case 'emoji':
        iconName = IconNames.emoji;
        break;
      case 'picture':
        iconName = IconNames.picture;
        break;
      case 'room':
        iconName = IconNames.room;
        break;
    }

    // ignore: prefer_initializing_formals
    name = iconName;
  }

  static String getColor(int arrayIndex, String? color, List<String>? colors,
      String defaultColor) {
    if (color != null && color.isNotEmpty) {
      return color;
    }

    if (colors != null && colors.isNotEmpty && colors.length > arrayIndex) {
      return colors.elementAt(arrayIndex);
    }

    return defaultColor;
  }

  @override
  Widget build(BuildContext context) {
    String svgXml;

    switch (name!) {
      case IconNames.edit:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M126 862h784v64H126zM325.3 799l-184.9-7.4-7.4-184.9L663.3 76.4l192.3 192.3L325.3 799zM202 730l97.9 3.9 465.3-465.3-101.9-101.7L198 632.1l4 97.9z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M534.164 250.806l45.254-45.254 147.077 147.076-45.254 45.255z"
              fill="''' +
            getColor(1, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.history:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M960 511.13a32 32 0 0 0-64 0.12v0.75c0 212.08-171.92 384-384 384S128 724.08 128 512s171.92-384 384-384c128.48 0 242.21 63.1 311.92 160H768a32 32 0 0 0 0 64h112a32 32 0 0 0 32-32V176a32 32 0 0 0-64 0v39.69C765.91 122.67 645.81 64 512 64 264.58 64 64 264.58 64 512s200.58 448 448 448 448-200.58 448-448v-0.87z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M720 544a32 32 0 0 0-32-32H512V336a32 32 0 0 0-32-32 32 32 0 0 0-32 32v208a32 32 0 0 0 32 32h208a32 32 0 0 0 32-32z"
              fill="''' +
            getColor(1, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.historyCopy:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M960 511.13a32 32 0 0 0-64 0.12v0.75c0 212.08-171.92 384-384 384S128 724.08 128 512s171.92-384 384-384c128.48 0 242.21 63.1 311.92 160H768a32 32 0 0 0 0 64h112a32 32 0 0 0 32-32V176a32 32 0 0 0-64 0v39.69C765.91 122.67 645.81 64 512 64 264.58 64 64 264.58 64 512s200.58 448 448 448 448-200.58 448-448v-0.87z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M720 544a32 32 0 0 0-32-32H512V336a32 32 0 0 0-32-32 32 32 0 0 0-32 32v208a32 32 0 0 0 32 32h208a32 32 0 0 0 32-32z"
              fill="''' +
            getColor(1, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.newLogo:
        svgXml = '''
          <svg viewBox="0 0 1063 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M532.546171 6.617124l-2.961163 1009.888983L6.617124 816.470436 532.546171 6.617124z"
              fill="''' +
            getColor(0, color, colors, '#FFFFFF') +
            '''"
              opacity=".11"
            />
            <path
              d="M6.617124 816.470436h1049.6579L532.546171 6.617124 6.617124 816.470436z"
              fill="''' +
            getColor(1, color, colors, '#FFFFFF') +
            '''"
              opacity=".28"
            />
            <path
              d="M531.206204 665.021002m-223.476834 0a223.476834 223.476834 0 1 0 446.953667 0 223.476834 223.476834 0 1 0-446.953667 0Z"
              fill="''' +
            getColor(2, color, colors, '#F6B669') +
            '''"
            />
            <path
              d="M531.206204 355.471922m-36.476899 0a36.476898 36.476898 0 1 0 72.953797 0 36.476898 36.476898 0 1 0-72.953797 0Z"
              fill="''' +
            getColor(3, color, colors, '#F6B669') +
            '''"
            />
            <path
              d="M531.206204 251.384556m-29.181519 0a29.181519 29.181519 0 1 0 58.363037 0 29.181519 29.181519 0 1 0-58.363037 0Z"
              fill="''' +
            getColor(4, color, colors, '#F6B669') +
            '''"
            />
            <path
              d="M531.206204 162.533118m-21.257513 0a21.257512 21.257512 0 1 0 42.515025 0 21.257512 21.257512 0 1 0-42.515025 0Z"
              fill="''' +
            getColor(5, color, colors, '#F6B669') +
            '''"
            />
            <path
              d="M531.206204 665.021002m-98.347012 0a98.347011 98.347011 0 1 0 196.694023 0 98.347011 98.347011 0 1 0-196.694023 0Z"
              fill="''' +
            getColor(6, color, colors, '#2E342D') +
            '''"
            />
            <path
              d="M532.728142 7.510436V1017.382876l523.546882-198.497189L532.728142 7.510436z"
              fill="''' +
            getColor(7, color, colors, '#FFFFFF') +
            '''"
              opacity=".19"
            />
          </svg>
        ''';
        break;
      case IconNames.messages:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M622.72 917.418667a128 128 0 0 1-221.44 0A42.666667 42.666667 0 0 1 438.186667 853.333333h147.626666a42.666667 42.666667 0 0 1 36.906667 64.085334zM938.666667 768H85.333333c-56.874667 0-56.874667-85.333333 0-85.333333a85.333333 85.333333 0 0 0 85.333334-85.333334V384a341.333333 341.333333 0 0 1 682.666666 0v213.333333a85.333333 85.333333 0 0 0 85.333334 85.333334c56.874667 0 56.874667 85.333333 0 85.333333z m-170.666667-170.666667V384A256 256 0 1 0 256 384v213.333333c0 31.104-8.32 60.245333-22.826667 85.333334h557.653334A169.941333 169.941333 0 0 1 768 597.333333z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.back:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M515.253602 953.842127c-197.716061 0-378.821815-132.747373-431.274444-332.763826C21.662881 383.270127 164.416142 139.100058 402.198733 76.783781c115.203812-30.222325 235.251955-13.707187 338.02055 46.372144 102.797247 60.104913 176.044482 156.630317 206.233038 271.807522 5.851265 22.331611-7.509021 45.174875-29.834492 51.024094-22.271236 5.89015-45.167712-7.496741-51.030234-29.828352-24.530696-93.579305-84.036975-172.010609-167.555134-220.838687-83.505879-48.840358-181.02389-62.22111-274.636964-37.684274-193.20021 50.636261-309.192991 249.02668-258.56287 442.246333 50.662867 193.166441 249.012354 309.166385 442.199261 258.475889 136.154983-35.650965 240.121869-148.250462 264.896112-286.86752 4.054339-22.727631 25.916253-37.888935 48.486294-33.788547 22.734794 4.061502 37.862329 25.767873 33.793664 48.495504-30.473035 170.573887-158.439522 309.144896-325.994656 353.019149C590.472747 949.114452 552.55823 953.842127 515.253602 953.842127z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M721.609437 549.811164 721.609437 549.811164l-322.43048-0.014326c-23.087834 0-41.793872-18.712177-41.793872-41.793872 0-23.079648 18.720364-41.792848 41.793872-41.792848l0 0 322.43048 0.013303c23.087834 0 41.793872 18.7132 41.793872 41.793872S744.682945 549.811164 721.609437 549.811164z"
              fill="''' +
            getColor(1, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M336.719416 549.838793c-10.69355 0-21.3871-4.080945-29.54899-12.244882-16.325827-16.318664-16.325827-42.779316 0-59.09798l191.567014-191.567014c16.325827-16.325827 42.773176-16.325827 59.099003 0 16.324804 16.318664 16.324804 42.779316 0 59.09798L366.268406 537.593911C358.106516 545.756825 347.411943 549.838793 336.719416 549.838793z"
              fill="''' +
            getColor(2, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M528.28643 741.323942c-10.692526 0-21.385053-4.080945-29.54899-12.236696L307.1561 537.532513c-16.324804-16.318664-16.324804-42.786479 0-59.105143 16.298198-16.325827 42.773176-16.318664 59.099003-0.007163l191.58134 191.553711c16.324804 16.318664 16.324804 42.787502 0 59.106166C549.686832 737.241974 538.97998 741.323942 528.28643 741.323942z"
              fill="''' +
            getColor(3, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.myself:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M662.62186 561.268406c68.523788-46.884193 113.609197-126.232559 113.609197-216.401253 0-146.068057-119.020424-265.088481-265.088481-265.088481-146.072307 0-263.289697 119.020424-263.289697 263.284384 0 90.169757 45.08541 169.51706 113.61026 216.401253C206.375662 620.778086 98.177692 770.454336 98.177692 945.37731l0 0 73.936077 0 0 0c0-173.118878 131.641661-317.383901 299.353562-337.221524 1.804096 0 46.885256-3.60713 84.755343 0l3.60713 0 0 0c164.104771 23.441566 290.33733 164.101583 290.33733 335.417427l0 0 75.739111 0 0 0C924.101085 770.454336 815.903115 620.778086 662.62186 561.268406L662.62186 561.268406zM511.142576 541.431845c-110.006317 0-198.367727-88.363535-198.367727-198.36879 0-110.002067 88.362473-198.363477 198.367727-198.363477 110.001004 0 198.363477 88.36141 198.363477 198.363477C709.506053 453.069373 621.14358 541.431845 511.142576 541.431845L511.142576 541.431845zM511.142576 541.431845"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.next:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M192 168.281708C192 139.429599 228.082893 116.844012 254.03609 133.881117 431.802265 250.790906 634.619171 360.017406 812.319138 476.927195 838.338544 494.029576 838.66958 528.691272 812.650173 545.793654 634.883999 662.703443 433.258822 772.336915 255.426438 889.246701 242.383635 897.863168 229.605658 897.536787 219.277344 892.184134 204.314528 887.35369 192 874.167885 192 852.365613L192 168.281708Z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.keyboard:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M513.488911 67.427692c-245.531066 0-444.574355 199.044312-444.574355 444.575378s199.043289 444.569238 444.574355 444.569238 444.570261-199.038172 444.570261-444.569238S759.019976 67.427692 513.488911 67.427692zM513.488911 902.830313c-215.85314 0-390.83236-174.975127-390.83236-390.828266 0-215.854163 174.97922-390.833383 390.83236-390.833383 215.854163 0 390.82929 174.97922 390.82929 390.833383C904.3182 727.855186 729.343073 902.830313 513.488911 902.830313z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M425.145863 423.658999l35.335786 0c9.754155 0 17.671475-7.916297 17.671475-17.670451l0-70.673619c0-9.750061-7.91732-17.665335-17.671475-17.665335l-35.335786 0c-9.754155 0-17.671475 7.916297-17.671475 17.665335l0 70.673619C407.475412 415.742702 415.391708 423.658999 425.145863 423.658999z"
              fill="''' +
            getColor(1, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M425.145863 582.675666l35.335786 0c9.754155 0 17.671475-7.916297 17.671475-17.670451L478.153124 494.331595c0-9.754155-7.91732-17.665335-17.671475-17.665335l-35.335786 0c-9.754155 0-17.671475 7.91118-17.671475 17.665335l0 70.673619C407.475412 574.759369 415.391708 582.675666 425.145863 582.675666z"
              fill="''' +
            getColor(2, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M566.491055 423.658999l35.33681 0c9.754155 0 17.670451-7.916297 17.670451-17.670451l0-70.673619c0-9.750061-7.916297-17.665335-17.670451-17.665335l-35.33681 0c-9.750061 0-17.665335 7.916297-17.665335 17.665335l0 70.673619C548.82572 415.742702 556.742017 423.658999 566.491055 423.658999z"
              fill="''' +
            getColor(3, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M566.491055 582.675666l35.33681 0c9.754155 0 17.670451-7.916297 17.670451-17.670451L619.498316 494.331595c0-9.754155-7.916297-17.665335-17.670451-17.665335l-35.33681 0c-9.750061 0-17.665335 7.91118-17.665335 17.665335l0 70.673619C548.82572 574.759369 556.742017 582.675666 566.491055 582.675666z"
              fill="''' +
            getColor(4, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M283.799648 423.658999l35.335786 0c9.751085 0 17.666358-7.916297 17.666358-17.670451l0-70.673619c0-9.750061-7.916297-17.665335-17.666358-17.665335l-35.335786 0c-9.754155 0-17.671475 7.916297-17.671475 17.665335l0 70.673619C266.129196 415.742702 274.045493 423.658999 283.799648 423.658999z"
              fill="''' +
            getColor(5, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M743.179197 317.649594l-35.33681 0c-9.754155 0-17.670451 7.916297-17.670451 17.665335l0 70.673619c0 9.754155 7.916297 17.670451 17.670451 17.670451l35.33681 0c9.754155 0 17.665335-7.916297 17.665335-17.670451l0-70.673619C760.844531 325.564867 752.933351 317.649594 743.179197 317.649594z"
              fill="''' +
            getColor(6, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M336.802816 565.005214 336.802816 494.331595c0-9.754155-7.916297-17.665335-17.666358-17.665335l-35.335786 0c-9.754155 0-17.671475 7.91118-17.671475 17.665335l0 70.673619c0 9.754155 7.91732 17.670451 17.671475 17.670451l35.335786 0C328.886519 582.675666 336.802816 574.759369 336.802816 565.005214z"
              fill="''' +
            getColor(7, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M743.179197 476.66626l-35.33681 0c-9.754155 0-17.670451 7.91118-17.670451 17.665335l0 70.673619c0 9.754155 7.916297 17.670451 17.670451 17.670451l35.33681 0c9.754155 0 17.665335-7.916297 17.665335-17.670451L760.844531 494.331595C760.844531 484.57744 752.933351 476.66626 743.179197 476.66626z"
              fill="''' +
            getColor(8, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M707.842387 653.349285 319.135434 653.349285c-9.754155 0-17.670451 7.916297-17.670451 17.670451l0 17.665335c0 9.754155 7.916297 17.671475 17.670451 17.671475l388.706953 0c9.750061 0 17.666358-7.91732 17.666358-17.671475l0-17.665335C725.508745 661.264559 717.592448 653.349285 707.842387 653.349285z"
              fill="''' +
            getColor(9, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.search:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M822.4 919.104c-27.136 0-47.488-6.784-61.056-27.136l-94.4-88.832a27.968 27.968 0 0 1-0.64-40.064l0.064-0.064a27.968 27.968 0 0 1 40.064 0.64l88.832 94.4c13.568 13.568 33.92 13.568 47.488 0a32.768 32.768 0 0 0 0-47.488l-89.216-94.848a29.056 29.056 0 0 1 0.576-40.448h0.064a29.44 29.44 0 0 1 41.536 0l94.528 94.592c33.984 33.92 33.984 88.192 0 122.112-20.352 20.352-40.704 27.136-67.84 27.136z m-379.968-135.68c-88.192 0-176.384-33.92-237.44-101.824-128.96-128.896-128.96-345.984 0-481.728 61.056-61.056 142.464-94.976 237.44-94.976 88.256 0 176.448 33.92 237.504 101.76 128.896 128.96 128.896 346.048 0 481.728-67.84 61.12-149.248 95.04-237.504 95.04z m0-624.256c-81.408 0-149.248 27.136-203.52 81.408a295.168 295.168 0 0 0 0 407.104c54.272 47.488 122.112 81.472 203.52 81.472 74.688 0 149.312-27.2 196.8-81.472 108.544-108.544 108.544-291.712 0-400.32-54.272-61.056-122.112-88.192-196.8-88.192z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.down:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M688 460.8H329.6l179.2 179.2z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.more:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512.4 1020c-281.6 0-510-228.4-510-510S230.8 0 512.4 0s510 228.4 510 510-228.4 510-510 510z m0-1002.4C240.4 17.6 20 238 20 510s220.4 492.4 492.4 492.4S1004.8 782 1004.8 510 784.4 17.6 512.4 17.6zM740 528.2h-191.2v191.2c0 15-12.2 27.4-27.4 27.4-15 0-27.4-12.2-27.4-27.4v-191.2h-191.2c-15 0-27.4-12.2-27.4-27.4 0-15 12.2-27.4 27.4-27.4H494v-191.2c0-15 12.2-27.4 27.4-27.4 15 0 27.4 12.2 27.4 27.4v191.2H740c15 0 27.4 12.2 27.4 27.4s-12.2 27.4-27.4 27.4z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.morePoint:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M106.66496 588.8C61.9008 588.8 25.6 553.2672 25.6 509.44 25.6 465.6128 61.89568 430.08 106.66496 430.08c44.7744 0 81.07008 35.5328 81.07008 79.36 0 43.8272-36.3008 79.36-81.07008 79.36zM512 588.8c-44.7744 0-81.06496-35.5328-81.06496-79.36 0-43.8272 36.29056-79.36 81.06496-79.36 44.7744 0 81.06496 35.5328 81.06496 79.36 0 43.8272-36.29056 79.36-81.06496 79.36z m405.33504 0c-44.7744 0-81.07008-35.5328-81.07008-79.36 0-43.8272 36.3008-79.36 81.07008-79.36S998.4 465.6128 998.4 509.44c0 43.8272-36.29568 79.36-81.06496 79.36z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.myselfPainter:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 128C299.92 128 128 299.92 128 512s171.92 384 384 384 384-171.92 384-384S724.08 128 512 128z m0 560c-97.2 0-176-78.8-176-176s78.8-176 176-176 176 78.8 176 176-78.8 176-176 176z m121.648 119.84c3.952-9.12 6.352-19.2 6.352-29.984v-19.728c0-13.776-3.76-26.544-10.016-37.376C702.72 679.472 752 601.44 752 512c0-132.336-107.664-240-240-240s-240 107.664-240 240c0 89.44 49.28 167.472 122.016 208.752A74.64 74.64 0 0 0 384 758.144v19.728c0 10.768 2.4 20.864 6.352 29.968C274.096 759.856 192 645.392 192 512c0-176.448 143.552-320 320-320s320 143.552 320 320c0 133.392-82.096 247.856-198.352 295.84z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M432 480m-48 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0Z"
              fill="''' +
            getColor(1, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M592 480m-48 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0Z"
              fill="''' +
            getColor(2, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.eyesClose:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M660.79 680.42c-10.1 0-19.95-5.15-25.52-14.43l-59.38-99.07c-8.44-14.09-3.86-32.33 10.22-40.79 14.08-8.44 32.33-3.85 40.77 10.22l59.38 99.07c8.44 14.09 3.86 32.33-10.22 40.79a29.613 29.613 0 0 1-15.25 4.21zM819.12 581.35c-7.61 0-15.22-2.9-21.02-8.71l-79.18-79.26c-11.6-11.63-11.59-30.44 0.02-42.05 11.61-11.57 30.42-11.59 42.03 0.02l79.18 79.26c11.6 11.63 11.59 30.44-0.02 42.05a29.66 29.66 0 0 1-21.01 8.69zM363.2 680.42c-5.2 0-10.47-1.35-15.25-4.24-14.09-8.44-18.65-26.68-10.22-40.77l59.38-99.07c8.44-14.07 26.69-18.67 40.77-10.2 14.09 8.44 18.65 26.68 10.22 40.77l-59.38 99.07c-5.57 9.29-15.42 14.44-25.52 14.44zM204.88 581.35c-7.6 0-15.2-2.9-21-8.69-11.61-11.61-11.62-30.42-0.02-42.05l79.18-79.26c11.61-11.61 30.42-11.59 42.03-0.02 11.61 11.61 11.62 30.42 0.02 42.05l-79.18 79.26c-5.81 5.81-13.42 8.71-21.03 8.71z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M521.59 561.54c-82.82 0-204.66-28.37-314.89-163.53-1.27-1.57-2.25-2.79-2.97-3.62-10.9-10.82-11.83-28.37-1.74-40.29 10.6-12.54 29.35-14.09 41.88-3.5 1.26 1.06 4.41 4.33 8.9 9.83 95.47 117.09 198.88 141.66 268.82 141.66 120.69 0 258.07-124.61 271.62-144.41 9.08-13.22 27.35-17.49 40.9-8.84 13.52 8.63 18.14 25.81 9.97 39.61-14.06 23.72-168.76 173.09-322.49 173.09z"
              fill="''' +
            getColor(1, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.boy:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M892.928 106.496c22.622 0 40.96 18.338 40.96 40.96v191.147c0 22.621-18.338 40.96-40.96 40.96s-40.96-18.339-40.96-40.96l-0.001-92.26-133.393 133.394c37.651 55.174 59.666 121.867 59.666 193.703 0 190.021-154.043 344.064-344.064 344.064-190.021 0-344.064-154.043-344.064-344.064 0-190.021 154.043-344.064 344.064-344.064 88.61 0 169.396 33.496 230.387 88.518L794.04 188.416h-92.26c-22.621 0-40.96-18.338-40.96-40.96s18.339-40.96 40.96-40.96h191.147z m-458.752 204.8c-144.778 0-262.144 117.366-262.144 262.144 0 144.778 117.366 262.144 262.144 262.144 144.778 0 262.144-117.366 262.144-262.144 0-144.778-117.366-262.144-262.144-262.144z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.add:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M501.333333 85.333333c229.76 0 416 186.24 416 416s-186.24 416-416 416S85.333333 731.093333 85.333333 501.333333 271.573333 85.333333 501.333333 85.333333z m0 64a352 352 0 1 0 0 704 352 352 0 0 0 0-704z m-15.018666 192.298667L490.666667 341.333333a32 32 0 0 1 31.701333 27.648l0.298667 4.352V469.333333h96a32 32 0 0 1 31.701333 27.648l0.298667 4.352a32 32 0 0 1-27.648 31.701334l-4.352 0.298666h-96v96a32 32 0 0 1-27.648 31.701334l-4.352 0.298666a32 32 0 0 1-31.701334-27.648l-0.298666-4.352-0.042667-96H362.666667a32 32 0 0 1-31.701334-27.648l-0.298666-4.352a32 32 0 0 1 27.648-31.701333L362.666667 469.333333h96V373.333333a32 32 0 0 1 27.648-31.701333L490.666667 341.333333z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.arrowRight:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M557.179 904c-8.189 0-16.379-3.124-22.628-9.372-12.496-12.497-12.496-32.759 0-45.256L871.924 512 534.551 174.627c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0l360 360c12.496 12.497 12.496 32.758 0 45.255l-360 360c-6.249 6.249-14.439 9.373-22.628 9.373z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.eyesOpen:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M511.414 840.293c-203.264 0-369.962-181.292-432.164-259.236-22.369-28.175-22.369-67.407 0-95.512 62.202-77.934 228.83-259.224 432.164-259.224 203.333 0 369.986 181.29 432.164 259.224 22.368 28.105 22.368 67.337 0 95.476-62.177 77.98-228.9 259.272-432.164 259.272m0-537.532c-174.947 0-329.239 176.405-372.359 230.498 43.12 54.189 197.506 230.592 372.359 230.592 174.877 0 329.214-176.403 372.383-230.486l-0.024-0.106c-43.144-54.092-197.412-230.498-372.359-230.498"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M511.414 687.375c-84.313 0-152.882-68.581-152.882-152.894s68.569-152.882 152.882-152.882c17.436 0 34.496 2.914 50.851 8.66 19.926 7.048 30.336 28.89 23.264 48.782-7.002 19.893-28.786 30.196-48.712 23.333-8.131-2.878-16.661-4.334-25.403-4.334-42.18 0-76.442 34.294-76.442 76.44s34.263 76.442 76.442 76.442c42.179 0 76.442-34.296 76.442-76.442 0-21.125 17.106-38.221 38.207-38.221 21.151 0 38.257 17.096 38.257 38.221 0 84.314-68.593 152.895-152.906 152.895"
              fill="''' +
            getColor(1, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.girl:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 72.03653a215.744292 215.744292 0 1 0 215.525114 215.890411v-0.219178A215.96347 215.96347 0 0 0 512 72.03653m0 503.378995A287.707763 287.707763 0 1 1 799.634703 287.561644v0.146119A288 288 0 0 1 512 575.415525m0 447.488585a35.945205 35.945205 0 0 1-35.945205-35.945206V711.159817H164.383562a35.945205 35.945205 0 1 1 0-71.96347h695.232876a36.018265 36.018265 0 0 1 0 71.96347H547.945205v275.726028a36.018265 36.018265 0 0 1-35.945205 35.945205"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.boys:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M933.767529 10.842353c44.634353 0 80.835765 36.141176 80.835765 80.715294V893.891765c0 44.574118-36.201412 80.715294-80.835765 80.715294H131.614118a80.775529 80.775529 0 0 1-80.77553-80.715294V91.557647c0-44.574118 36.141176-80.775529 80.77553-80.775529zM444.235294 331.294118a263.529412 263.529412 0 0 0 0 527.058823 263.529412 263.529412 0 0 0 0-527.058823z m0 59.331764a204.197647 204.197647 0 1 1 0 408.395294 204.197647 204.197647 0 0 1 0-408.395294zM888.952471 120.470588H579.282824a29.696 29.696 0 0 0 0 59.331765h236.303058L650.541176 336.896l-3.553882 4.096a30.117647 30.117647 0 0 0 45.176471 39.574588l167.092706-159.141647 0.060235 238.411294a29.696 29.696 0 0 0 29.635765 29.635765 29.756235 29.756235 0 0 0 29.635764-29.696V149.865412A29.515294 29.515294 0 0 0 888.952471 120.470588z"
              fill="''' +
            getColor(0, color, colors, '#333333') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.audio:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 64c247.424 0 448 200.576 448 448S759.424 960 512 960 64 759.424 64 512 264.576 64 512 64z m0 68c-209.868 0-380 170.132-380 380s170.132 380 380 380 380-170.132 380-380-170.132-380-380-380z m52.766 130.24c12.33-12.32 32.298-12.32 44.625-0.005l0.018 0.019 4.026 4.133c131.545 137.211 131.4 354.035-0.317 491.07l-4.073 4.17-0.342 0.348c-5.74 5.758-13.6 9.025-21.802 9.025a30.85 30.85 0 0 1-22.19-9.419c-11.208-11.926-11.208-30.444-0.044-42.324l0.097-0.1 3.343-3.404c109.19-113.003 109.2-292.426 0.033-405.442l-3.376-3.438-0.365-0.372c-11.943-12.356-11.821-32.055 0.367-44.261z m-115.333 89.643c11.818-10.51 29.644-10.51 41.463-0.003l0.462 0.418 0.096 0.1 2.53 2.652c82.68 88.053 82.688 225.361 0.026 313.424l-2.672 2.799-0.124 0.11-0.358 0.316c-11.864 10.301-29.51 10.302-41.376 0.003l-0.533-0.472-0.157-0.171-0.325-0.36c-10.61-11.942-10.502-30.015 0.325-41.832l0.132-0.138 1.892-1.933c61.805-64.168 61.812-165.846 0.019-230.022l-1.998-2.04-0.083-0.092-0.318-0.361c-10.4-11.99-10.294-29.879 0.318-41.747l0.154-0.172 0.17-0.157z m-128.057 125.89c13.666-13.46 34.104-17.488 51.906-10.157C391.264 475.02 403 492.549 403 512c0 19.452-11.736 36.98-29.718 44.385a47.973 47.973 0 0 1-51.93-10.182l-0.413-0.412-0.425-0.427A47.64 47.64 0 0 1 306.889 512a47.658 47.658 0 0 1 13.675-33.413l0.4-0.403z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.chat:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 143.36c178.81088 0 324.1984 143.23712 327.61856 321.2288L839.68 471.04v49.47968A102.4 102.4 0 0 1 983.04 614.4v163.84a102.4 102.4 0 0 1-204.8 0V471.04c0-147.0464-119.1936-266.24-266.24-266.24-144.93696 0-262.81984 115.8144-266.15808 259.95264L245.76 471.04v307.2a102.4 102.4 0 0 1-204.8 0v-163.84a102.4 102.4 0 0 1 143.36-93.88032V471.04c0-180.98176 146.69824-327.68 327.68-327.68z m8.6016 358.5024l0.8192 2.68288 41.24672 165.10976 24.24832-48.5376a30.72 30.72 0 0 1 24.59648-16.85504L614.4 604.16h81.92a30.72 30.72 0 0 1 2.94912 61.29664l-2.94912 0.14336-62.93504-0.02048-52.87936 105.92256c-12.30848 24.63744-47.80032 21.64736-56.46336-3.4816l-0.8192-2.78528-44.62592-178.46272-43.52 65.16736a30.72 30.72 0 0 1-22.48704 13.5168l-3.072 0.14336H327.68a30.72 30.72 0 0 1-2.94912-61.29664l2.94912-0.14336 65.4336-0.02048 72.94976-109.17888c14.27456-21.38112 46.46912-16.62976 54.53824 6.92224z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.setting:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M416.4 958h191.2V849.7c0-12.7 6.4-25.5 19.1-31.9 31.9-12.7 63.7-31.9 89.2-51 12.7-6.4 25.5-6.4 38.2 0l95.6 57.3 95.6-165.7-95.6-57.3C837 588.5 830.6 575.7 837 563c0-19.1 6.4-31.9 6.4-51s0-31.9-6.4-51c0-12.7 6.4-25.5 12.7-31.9l95.6-57.3-95.6-165.7-95.6 57.3c-12.7 6.4-25.5 6.4-38.2 0-25.5-19.1-57.3-38.2-89.2-51-12.7-12.7-19.1-25.5-19.1-38.2V66H416.4v108.3c0 12.7-6.4 25.5-19.1 31.9-31.9 12.7-63.7 31.9-89.2 51-12.7 6.4-25.5 6.4-38.2 0l-95.6-51-95.6 165.6 95.6 57.3c12.7 6.4 19.1 19.1 12.7 31.9 0 19.1-6.4 31.9-6.4 51s0 31.9 6.4 51c6.4 12.7 0 25.5-12.7 31.9l-95.6 57.3 95.6 165.7 95.6-57.3c12.7-6.4 25.5-6.4 38.2 0 25.5 19.1 57.3 38.2 89.2 51 12.7 6.4 19.1 19.1 19.1 31.9V958z m223 63.7H384.6c-19.1 0-31.9-12.7-31.9-31.9v-121c-25.5-12.7-51-25.5-70.1-38.2l-101.9 63.7c-12.7 6.4-31.9 6.4-44.6-12.7L8.6 658.6c-12.7-19.1-6.4-38.2 12.7-44.6l101.9-63.7v-76.5L21.4 410.1c-19.1-6.4-25.5-25.5-12.7-44.6l127.4-223c6.4-12.7 25.5-19.1 44.6-6.4l101.9 63.7c19.1-12.7 44.6-31.9 70.1-38.2V34.1c0-19.1 12.7-31.9 31.9-31.9h254.9c19.1 0 31.9 12.7 31.9 31.9v121.1c25.5 12.7 51 25.5 70.1 38.2l101.9-63.7c12.7-6.4 31.9-6.4 44.6 12.7l127.4 223c12.7 19.1 6.4 38.2-12.7 44.6l-101.9 63.7v76.5l101.9 63.7c12.7 6.4 19.1 25.5 12.7 44.6L888 881.5c-6.4 12.7-25.5 19.1-44.6 12.7l-101.9-63.7c-19.1 12.7-44.6 31.9-70.1 38.2v121.1c-0.1 19.2-12.8 31.9-32 31.9zM512 703.2c-108.3 0-191.2-82.8-191.2-191.2S403.7 320.8 512 320.8 703.2 403.7 703.2 512 620.3 703.2 512 703.2z m0-318.6c-70.1 0-127.4 57.3-127.4 127.4S441.9 639.4 512 639.4 639.4 582.1 639.4 512 582.1 384.6 512 384.6z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.provider:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M0 112m48 0l928 0q48 0 48 48l0 0q0 48-48 48l-928 0q-48 0-48-48l0 0q0-48 48-48Z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M192 0m80 0l0 0q80 0 80 80l0 160q0 80-80 80l0 0q-80 0-80-80l0-160q0-80 80-80Z"
              fill="''' +
            getColor(1, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M0 464m48 0l928 0q48 0 48 48l0 0q0 48-48 48l-928 0q-48 0-48-48l0 0q0-48 48-48Z"
              fill="''' +
            getColor(2, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M672 352m80 0l0 0q80 0 80 80l0 160q0 80-80 80l0 0q-80 0-80-80l0-160q0-80 80-80Z"
              fill="''' +
            getColor(3, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M0 816m48 0l928 0q48 0 48 48l0 0q0 48-48 48l-928 0q-48 0-48-48l0 0q0-48 48-48Z"
              fill="''' +
            getColor(4, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M384 704m80 0l0 0q80 0 80 80l0 160q0 80-80 80l0 0q-80 0-80-80l0-160q0-80 80-80Z"
              fill="''' +
            getColor(5, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.emoji:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 160C317.5936 160 160 317.5936 160 512S317.5936 864 512 864 864 706.4064 864 512 706.4064 160 512 160z m0 64c159.0528 0 288 128.9472 288 288S671.0528 800 512 800 224 671.0528 224 512 352.9472 224 512 224z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M683.3408 501.248H340.6592a25.6 25.6 0 0 0-25.6 26.112l0.1536 6.912a196.9408 196.9408 0 0 0 393.728-7.3984 25.6 25.6 0 0 0-25.6-25.6z m-27.8784 51.2l-0.3072 1.792A145.7664 145.7664 0 0 1 512 672.5888l-5.7088-0.1024a145.8176 145.8176 0 0 1-137.2928-117.4272l-0.4864-2.6112h286.9504z"
              fill="''' +
            getColor(1, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M411.1104 411.4432m-38.7584 0a38.7584 38.7584 0 1 0 77.5168 0 38.7584 38.7584 0 1 0-77.5168 0Z"
              fill="''' +
            getColor(2, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M612.8896 411.4432m-38.7584 0a38.7584 38.7584 0 1 0 77.5168 0 38.7584 38.7584 0 1 0-77.5168 0Z"
              fill="''' +
            getColor(3, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.picture:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M778 183.8H247c-50.8 0-92 41.2-92 92v435c-1.2 4.8-1.2 9.4 0 14v23.6c0 50.8 41.2 92 92 92h531c50.8 0 92-41.2 92-92V275.8c0-50.8-41.2-92-92-92z m-531 56h531c19.8 0 36 16.2 36 36v349.4c-20.8-28.2-46-59-72.2-83.4-15.6-14.6-35-20.6-56.2-17.6-33.4 4.8-70 32.6-111.8 84.8-10 12.4-19 24.8-26.4 35.4-36.8-50.8-109.2-144.6-170.6-187.8-18.2-12.8-38.6-15.8-59.4-9-22.6 7.4-44.6 26.6-67 58.6-13 18.4-26.2 41.2-39.6 68V275.8c0.2-20 16.2-36 36.2-36z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M632 374.8a63 63 0 1 0 126 0 63 63 0 1 0-126 0z"
              fill="''' +
            getColor(1, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.room:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M773.700267 726.289067H257.7408v-299.52c0-7.748267 3.822933-14.9504 10.24-19.285334l247.739733-167.2192 247.722667 167.2192c6.417067 4.334933 10.24 11.554133 10.24 19.285334v299.52z m8.840533-347.0848L525.2608 205.533867a17.066667 17.066667 0 0 0-19.114667 0L248.900267 379.1872a57.2928 57.2928 0 0 0-25.2928 47.581867v316.586666a17.066667 17.066667 0 0 0 17.066666 17.066667h550.075734a17.066667 17.066667 0 0 0 17.066666-17.066667v-316.586666a57.344 57.344 0 0 0-25.258666-47.5648z"
              fill="''' +
            getColor(0, color, colors, '#ffffff') +
            '''"
            />
            <path
              d="M498.6368 635.272533h34.133333V433.749333h-34.133333zM425.8816 602.4704h34.133333v-131.2256h-34.133333zM353.109333 579.037867h34.133334v-84.360534h-34.133334zM571.409067 602.4704h34.133333v-131.2256h-34.133333zM644.1984 579.037867h34.133333v-84.360534h-34.133333z"
              fill="''' +
            getColor(1, color, colors, '#ffffff') +
            '''"
            />
          </svg>
        ''';
        break;
    }

    return SvgPicture.string(svgXml, width: size, height: size);
  }
}
